{% extends "grid/base.html" %}

{% load crispy_forms_tags i18n page_metadata_tags %}

{% block metadata %}
    {% translate "Edit Element" as trans_title %}
    {% page_metadata page_title=trans_title %}
{% endblock metadata %}

{% block body %}

    <h2>{% translate "Edit Element which is related to:" %}</h2>

    <p><strong>{% translate "Grid:" %} {{ grid }}</strong></p>
    <p><strong>{% translate "Package:" %} {{ package }}</strong></p>
    <p><strong>{% translate "Feature:" %} {{ feature.title }}</strong> {{ feature.description }}</p>


    <form action="{{ request.path }}" method="post">
        {% csrf_token %}
        <fieldset>
            {{ form|crispy }}
            <div class="form_block">
                <input class="btn btn-default" type="submit" name="edit" value="{% translate "Edit" %}">
                <a href="{% url 'grid' grid.slug %}">{% translate "cancel" %}</a>
            </div>

        </fieldset>
    </form>

    <p>

    </p>

{% endblock body %}

{% block extra_body %}
    <script>
        $("#id_text").focus();
    </script>
{% endblock extra_body %}
